#pragma once
#include<math.h>


class Point {
public:
	Point(int a, int b):x(a),y(b){}
	Point() :x(0), y(0) {}
protected:
	int x;
	int y;

};


class Line:public Point {
public:
	Line() :Point(0,0),x2(1),y2(1) {}
	Line(int a, int b, int c, int d):Point(a,b),x2(c),y2(d){}
	double getLength(int x,int y,int x2,int y2);
protected:
	int x2, y2;
};


class Triangle :public Line {
public:
	Triangle() :Line(0,0,1,1),x3(1),y3(2){	}

	Triangle(int a,int b,int c, int d, int e, int f):Line(a,b,c,d),x3(e),y3(f){}
	void getArea();
	void show();
private:
	int x3;
	int y3;
};







